<?php
/*
	消息通知设置
	参数：$msgtype,$text,$tpldata,$uid,$url,$color
*/
defined('BY_JYA') or exit('error');
list($msgtype,$uid,$o_id,$order_id)=$arguments;
$adminuid = $this->plugin_setting('basic')['adminuid'];
$basic=$this->plugin_setting('basic');
if($msgtype == 'setred'){
	$url=custom_url('jy_quan/home/feelog/',true);
	$tpldata=array(
		'first'=>array('value'=>'您好，您发出一个红包！','color'=>''),
		'remark'=>array('value'=>'查看红包信息~!','color'=>'#ff510'),
	);
	$newsmsg['msgtype']='news';
	$articles[0]['title'] = "您好，您发出一个红包！\n";
	$articles[0]['description'] .='查看红包信息~!';
	$articles[0]['url'] =$url;
	$newsmsg['news']['articles'] =$articles;
	$this->send_message('setred',$newsmsg,$tpldata,$_SESSION['uid'],$url,$color);
}elseif($msgtype == 'buyvip'){
	$url=custom_url('jy_quan/myhome/',true);
	$tpldata=array(
		'first'=>array('value'=>'您好，您已成功购买VIP！','color'=>''),
		'remark'=>array('value'=>'查看VIP信息~!','color'=>'#ff510'),
	);
	$url2=custom_url('jy_quan/myhome/',true);
	$newsmsg['msgtype']='news';
	$articles[0]['title'] = "您好，有一条购买VIP消息！\n";
	$articles[0]['description'] .='查看VIP信息~!';
	$articles[0]['url'] =$url2;
	$newsmsg['news']['articles'] =$articles;
	$this->send_message('getvip',$newsmsg,$tpldata,$adminuid,$url2,$color);
	$this->send_message('buyvip',$newsmsg,$tpldata,$_SESSION['uid'],$url,$color);
}elseif($msgtype == 'upitem'){
	$staff_tpl_id=cfc('account')->get_tpl_template_id('TM00351','新订单通知')
}elseif($msgtype == 'tixian'){
	$staff_tpl_id=cfc('account')->get_tpl_template_id('OPENTM405485000','提现申请通知')
}

